<%--
  Created by IntelliJ IDEA.
  User: JAVA01
  Date: 2024/9/26
  Time: 16:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>$Title$</title>
    <script src="https://cdn.staticfile.net/jquery/3.5.0/jquery.min.js"></script>

    <script type="text/javascript">
        $(function () {
            $.ajax({
                url: "${pageContext.request.contextPath}/json",
                method: "post",
                data: "张三",
                contentType: 'application/json',
                dataType:"json",
              success:function (result) {
                alert(result.username);
              }
            });
        })


    </script>
</head>
<body>

</body>
</html>
